package com.ipartek.desarrollo.beanHibernate;

// Generated 26-feb-2014 21:38:33 by Hibernate Tools 3.4.0.CR1

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Representanteslegales generated by hbm2java
 */
@Entity
@Table(name = "representanteslegales")
public class Representanteslegales implements java.io.Serializable {

	private Integer repLegalId;
	private String repLegalDni;
	private String repLegalNom;
	private String repLegalApell1;
	private String repLegalApell2;
	private Set<Empresasagrupadas> empresasagrupadases = new HashSet<Empresasagrupadas>(
			0);

	public Representanteslegales() {
	}

	public Representanteslegales(String repLegalDni, String repLegalNom,
			String repLegalApell1, String repLegalApell2,
			Set<Empresasagrupadas> empresasagrupadases) {
		this.repLegalDni = repLegalDni;
		this.repLegalNom = repLegalNom;
		this.repLegalApell1 = repLegalApell1;
		this.repLegalApell2 = repLegalApell2;
		this.empresasagrupadases = empresasagrupadases;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "RepLegalId", unique = true, nullable = false)
	public Integer getRepLegalId() {
		return this.repLegalId;
	}

	public void setRepLegalId(Integer repLegalId) {
		this.repLegalId = repLegalId;
	}

	@Column(name = "RepLegalDNI", length = 50)
	public String getRepLegalDni() {
		return this.repLegalDni;
	}

	public void setRepLegalDni(String repLegalDni) {
		this.repLegalDni = repLegalDni;
	}

	@Column(name = "RepLegalNom", length = 100)
	public String getRepLegalNom() {
		return this.repLegalNom;
	}

	public void setRepLegalNom(String repLegalNom) {
		this.repLegalNom = repLegalNom;
	}

	@Column(name = "RepLegalApell1", length = 100)
	public String getRepLegalApell1() {
		return this.repLegalApell1;
	}

	public void setRepLegalApell1(String repLegalApell1) {
		this.repLegalApell1 = repLegalApell1;
	}

	@Column(name = "RepLegalApell2", length = 100)
	public String getRepLegalApell2() {
		return this.repLegalApell2;
	}

	public void setRepLegalApell2(String repLegalApell2) {
		this.repLegalApell2 = repLegalApell2;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "representanteslegales")
	public Set<Empresasagrupadas> getEmpresasagrupadases() {
		return this.empresasagrupadases;
	}

	public void setEmpresasagrupadases(
			Set<Empresasagrupadas> empresasagrupadases) {
		this.empresasagrupadases = empresasagrupadases;
	}

}
